<?php

/**
 * Company form base class.
 *
 * @method Company getObject() Returns the current form's model object
 *
 * @package    BootcampApp
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 29553 2010-05-20 14:33:00Z Kris.Wallsmith $
 */
abstract class BaseCompanyForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'                 => new sfWidgetFormInputHidden(),
      'company_name'       => new sfWidgetFormInputText(),
      'founded_at'         => new sfWidgetFormDate(),
      'tagline'            => new sfWidgetFormInputText(),
      'website'            => new sfWidgetFormInputText(),
      'employees'          => new sfWidgetFormInputText(),
      'about'              => new sfWidgetFormTextarea(),
      'short_pitch'        => new sfWidgetFormInputText(),
      'description'        => new sfWidgetFormTextarea(),
      'markets'            => new sfWidgetFormTextarea(),
      'customer'           => new sfWidgetFormInputText(),
      'problems'           => new sfWidgetFormInputText(),
      'solutions'          => new sfWidgetFormTextarea(),
      'landscapes'         => new sfWidgetFormTextarea(),
      'advantages'         => new sfWidgetFormInputText(),
      'partner_plan'       => new sfWidgetFormInputText(),
      'business_model'     => new sfWidgetFormInputText(),
      'strategy'           => new sfWidgetFormTextarea(),
      'affiliate_plan'     => new sfWidgetFormInputText(),
      'additional_details' => new sfWidgetFormTextarea(),
    ));

    $this->setValidators(array(
      'id'                 => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id')), 'empty_value' => $this->getObject()->get('id'), 'required' => false)),
      'company_name'       => new sfValidatorString(array('max_length' => 80)),
      'founded_at'         => new sfValidatorDate(array('required' => false)),
      'tagline'            => new sfValidatorString(array('max_length' => 80, 'required' => false)),
      'website'            => new sfValidatorString(array('max_length' => 120, 'required' => false)),
      'employees'          => new sfValidatorInteger(array('required' => false)),
      'about'              => new sfValidatorString(array('max_length' => 450, 'required' => false)),
      'short_pitch'        => new sfValidatorString(array('max_length' => 140, 'required' => false)),
      'description'        => new sfValidatorString(array('max_length' => 450, 'required' => false)),
      'markets'            => new sfValidatorString(array('max_length' => 450, 'required' => false)),
      'customer'           => new sfValidatorString(array('max_length' => 210, 'required' => false)),
      'problems'           => new sfValidatorString(array('max_length' => 210, 'required' => false)),
      'solutions'          => new sfValidatorString(array('max_length' => 450, 'required' => false)),
      'landscapes'         => new sfValidatorString(array('max_length' => 450, 'required' => false)),
      'advantages'         => new sfValidatorString(array('max_length' => 210, 'required' => false)),
      'partner_plan'       => new sfValidatorString(array('max_length' => 210, 'required' => false)),
      'business_model'     => new sfValidatorString(array('max_length' => 210, 'required' => false)),
      'strategy'           => new sfValidatorString(array('max_length' => 450, 'required' => false)),
      'affiliate_plan'     => new sfValidatorString(array('max_length' => 210, 'required' => false)),
      'additional_details' => new sfValidatorString(array('max_length' => 450, 'required' => false)),
    ));

    $this->widgetSchema->setNameFormat('company[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'Company';
  }

}
